<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>角色列表</title>
    <#include "/layout/css.html"/>
</head>
<body class="body">

<!-- 工具集 -->
<div class="my-btn-box">
	<form class="layui-form" action="" id="formId"  onsubmit="return false">
	  <div class="layui-form-item">
	    <label class="layui-form-label">角色id </label>
	    <div class="layui-input-block">
	      <input type="text" name="sysRoleId" readonly="readonly" value="${data.sysRoleId!}" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">角色名称</label>
	    <div class="layui-input-block">
	      <input type="text" name="name" value="${data.name!}" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">角色code</label>
	    <div class="layui-input-block">
	      <input type="text" name="roleCode" <#if data??&&data.roleCode??>readonly="readonly"</#if> value="${data.roleCode!}"  autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">排序</label>
	    <div class="layui-input-block">
	      <input type="text" name="seq" value="${data.seq!}"  autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">角色简介</label>
	    <div class="layui-input-block">
	      <input type="text" name="description" value="${data.description!}"   autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" id="addOrEditFun" lay-filter="formDemo">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	</form>
</div>
<!-- 表格 -->

<#include "/layout/js.html"/>
<script type="text/javascript">
    // layui方法
    layui.use(['table', 'form', 'layer', 'vip_table'], function () {
        // 操作对象
        var form = layui.form
                , table = layui.table
                , layer = layui.layer
                , vipTable = layui.vip_table
                , $ = layui.jquery;
        var table = layui.table;
        
        
        //第一个实例
        function addOrEditFun(){
        	authManagerHttp({url:"/role/addOrEditData",data:$("#formId").serialize()},null)
        }
        
        $('#addOrEditFun').on('click', function () {
        	addOrEditFun();
        });
    });
</script>
</body>
</html>